package com.animee.day11.utils;

import ohos.aafwk.ability.AbilitySlice;

public  class DisplayUtils{
    public static int getWindowWdith(AbilitySlice context) {
        return context.getResourceManager().getDeviceCapability().width *
                context.getResourceManager().getDeviceCapability().screenDensity / 160;
    }
    // 获取屏幕的高度
    public static int getWindowHeight(AbilitySlice context) {
        return context.getResourceManager().getDeviceCapability().height *
                context.getResourceManager().getDeviceCapability().screenDensity / 160;
    }
}